function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}

function fctCheckValues()
{	
	var sValue = document.getElementById("mesh").value;
		
	if(sValue == "other+other")
	{
		document.getElementById("add_dis").style.display = "block";		
		document.getElementById("dis_name_new").style.display = "block";				
	}
	else
	{
		document.getElementById("add_dis").style.display = "none";		
		document.getElementById("dis_name_new").style.display = "none";		
	}
}


{
function fctNumVal()
  {
tecla = event.keyCode;
if (tecla >= 48 && tecla <= 57)
    {
    return true;
    }
else
    {
    return false;
    }
  }
}

function ValidaEmail()
{
  var obj = eval("document.forms[0].dis_email");
  var txt = obj.value;
  var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
  var check=/@[\w\-]+\./;
  var checkend=/\.[a-zA-Z]{2,3}$/;
  if(((txt.search(exclude) != -1)||(txt.search(check)) == -1)||(txt.search(checkend) == -1))
  {
    alert('Invalid E-mail!');
	obj.focus();
  }
}

function valMandatoryFields(form){
            var error=0;
            var mandatory;           
            for (i=0;i<form.length;i++){
                        mandatory = form[i].lang;
                        if (mandatory==1){
                                   if (form[i].value == "" || form[i].value == " + "){
                                               var name = form[i].name;
                                               changeFieldColor(form[i], 'red');

                                               error++;
                                   }
                        }
            }
            if(error>=1){
                        alert("There are " + error + " empty mandatory fields! ")
                        return false;
            } else
                        return true;
}

function changeFieldColor(element, color){
            element.style.backgroundColor=color;
}

{
function fctDecimalVal()
  {
tecla = event.keyCode;
if (tecla === 46 || (tecla >= 48 && tecla <= 57))
    {
    return true;
    }
else
    {
    return false;
    }
  }
}